﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
//
using PerceptiveMCAPI;
using PerceptiveMCAPI.Types;
//

namespace PerceptiveMCAPI_Test
{
   public partial class show_campaignClickStats : System.Web.UI.UserControl
   {
      public void Display( campaignClickStatsOutput output )
      {
         this.Visible = true;
         //
         if ( output.result.Count > 0 )
         {
            lblMessage.Text = ""; lblMessage.Visible = false;
            gvClickStats.DataSource = output.result;
            gvClickStats.DataBind();
         }
         else
         {
            lblMessage.Visible = true;
            lblMessage.Text = "There are no click statistics available for this campaign";
            gvClickStats.DataSource = null;
            gvClickStats.DataBind();
         }
      }
   }
}